+ 8

what will be the out put of the code name=Anu will it be string or characters

21st Sep 2016, 7:27 AM
Athul Joy
Athul Joy - avatar
4 Answers
+ 5
Python will tell you that the variable Anu is not defined. Use a pair of quotes or double-quotes to make strings. name = "Anu"
21st Sep 2016, 7:43 AM
Zen
Zen - avatar
+ 2
I think this is just an "NameError" you can not assign variable to any unknown variable. Though if it is not known it will assign the value of right side variable to left hand side. Anu = "Anu" name = Anu print(name) This will do just fine.
23rd Sep 2016, 7:51 AM
Ajay Singh Parmar
Ajay Singh Parmar - avatar
+ 1
You would have to put a double quotes around Anu like "Anu" to make it a string
22nd Sep 2016, 5:57 AM
Prince Mathew
Prince Mathew - avatar
+ 1
ERROR ! ERROR! ERROR! (robotic voice)
14th Jun 2017, 4:35 PM
Devanshu Rawat
Devanshu Rawat - avatar