- Создание имени динамического массива в Python numpy
- Создание имени динамического массива в Python
- Создание имени динамического класса Python
- (Python) Can ' array' будет именем переменной?
- 2009-10_rates
- 2009-12_rates
- 2020 -03_rates
Код:
Код: Выделить всё
yrstart = formattedtemptimestamp.year
print('yrstart = ' + str(yrstart))
d = date.fromtimestamp(temptimestamp).strftime('%Y-%m-%d')
print('d = ' + str(d))
name = str(d) + 'array'
name = str(name)
print(name)
name = array.array('u', yrstart)
print(name)
name.insert(yrend)
print(name)
Код: Выделить всё
yrstart = 2024
d = 2024-07-10
2024-07-10array
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[1], line 78
76 name = str(name)
77 print(name)
---> 78 name = array.array('u', yrstart)
79 print(name)
80 name.insert(yrend)
TypeError: 'int' object is not iterable
Подробнее здесь: https://stackoverflow.com/questions/790 ... t-creation