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 in Python by Waseem
• 4,480 points
22 views

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 by anonymous
• 460 points

selected Aug 20 by Kalgi
0 votes
NO there is no provision to declare constants in python.
answered Aug 19 by Mohammad
• 3,060 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,132 views
+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
• 56,900 points
136 views
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
104 views
+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 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 278 views
+4 votes
6 answers