fork(2) download
  1. with open('pytest.txt') as f:
  2. numList = list(map(int, f.readline().split(',')))
  3.  
  4. k = int(input('Введите число k: '))
  5.  
  6. for i in range(len(numList)):
  7. if '1' in str(i):
  8. numList.insert(i-1, k)
  9. print(numList)
  10.  
  11.  
  12. #список уровня [-1,2,3,4,0,-359,14,88,1337,0]
Runtime error #stdin #stdout #stderr 0s 28384KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'pytest.txt'