How to declare constants in python?

0 votes
Is there a different declaration that we have to follow? or does it work like other programming languages?
Aug 16, 2019 in Python by Waseem
• 4,540 points

2 answers to this question.

+1 vote
Best answer
In python we don't require to declare an element and its data type.

With assignment an object get created and per value its data type automatically understood by python.

Even like other programming if it is defined and declared there is no harm, its choice of developer and  comfort.
answered Aug 18, 2019 by anonymous
• 460 points

selected Aug 20, 2019 by Kalgi
0 votes
NO there is no provision to declare constants in python.
answered Aug 19, 2019 by Mohammad
• 3,210 points

Related Questions In Python

+4 votes
7 answers
+3 votes
5 answers

How to read multiple data files in python

Firstly we will import pandas to read ...READ MORE

answered Apr 6, 2018 in Python by DeepCoder786
• 1,720 points
+2 votes
11 answers
+1 vote
1 answer

How to create plots using python matplotlib in IPython notebook?

I think you should try: I used %matplotlib inline in ...READ MORE

answered Aug 8, 2018 in Python by Priyaj
• 57,640 points
0 votes
1 answer

How to add a new line in Python?

You can use '\n' for a next ...READ MORE

answered May 2, 2018 in Python by aayushi
• 750 points
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,357 views
0 votes
0 answers
+4 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,800 points