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
933 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, 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,230 points

Related Questions In Python

+4 votes
7 answers
0 votes
1 answer
0 votes
1 answer

How to declare an array in Python?

variable = [] Now variable refers to an empty list*. Of ...READ MORE

answered Jan 5, 2021 in Python by Gitika
• 65,770 points
1,315 views
+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
15,327 views
+1 vote
12 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
• 58,020 points
1,616 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,464 views
0 votes
1 answer
+5 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,790 points
4,125 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP