Answer the question
In order to leave comments, you need to log in
The dumbest part of the code doesn't work, what should I do?
The code:
import time
a = time.time()
print('Время сейчас:\n'+str(a))
File "Путь\tests.py", line 32, in <module>
a = time.time()
AttributeError: 'str' object has no attribute 'time'
Answer the question
In order to leave comments, you need to log in
Based on the fact that your code works here:
https://www.programiz.com/python-programming/onlin...
I foresee that you have a variable called time in this file that overwrites the time module. Most likely somewhere on the 15th line
It needs to be renamed (for example, to nettime)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question