A
A
avion2018-05-05 17:08:32
Python
avion, 2018-05-05 17:08:32

Assignment in python?

What is the reason?

b = ['5', '6', '7']
с = b.count('5')
print(c)

Mistake:
Traceback (most recent call last):
  File "<input>", line 1, in <module>
NameError: name 'c' is not defined

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2018-05-05
@avion123678

Before opening the spoiler, try to find the error yourself
Не смешивате кириллицу и латиницу в коде

E
epanov, 2018-05-10
@epanov

с = b.count('5')
Your "s" is written in Cyrillic, apparently the layout was not switched.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question