I don't understand the little turtle's after-school exercises, why does a bug appear?
笙洺
笙洺 2020-07-23 11:05:26
0
0
1147

In the example, the little turtle has a variable named str, but in fact we found that the color of str seems to be different from that of ordinary variables? Yes, str() and print() are both built-in functions, but Python doesn’t seem to mind us assigning values ​​to built-in functions, so we must pay attention to this in the future, otherwise the following BUG may occur:>> > print = 1>>> print("I love FishC")Traceback (most recent call last): File "<pyshell#37>", line 1, in <module> print("I love FishC ")TypeError: 'int' object is not callable

笙洺
笙洺

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!