for no, name in enumerate(song_list):
if name.endswith(“.txt”) or name.endswith(“.skysheet”):
print(f”{no+1}) {name.split(‘.’)[0]}”)
——————
Please select a song with the corresponding number.
Traceback (most recent call last):
File “/Users/XXX/Downloads/Sky-Music-Player-main/test copy.py”, line 194, in <module>
for no, name in enumerate(song_list):
~~~~~~~~~^^^^^^^^^^^
TypeError: ‘function’ object is not iterable. How do I fix? This is a downloaded python script btw
submitted by /u/MusicAnime
[link] [comments]
r/learnpython for no, name in enumerate(song_list): if name.endswith(“.txt”) or name.endswith(“.skysheet”): print(f”{no+1}) {name.split(‘.’)[0]}”) —————— Please select a song with the corresponding number. Traceback (most recent call last): File “/Users/XXX/Downloads/Sky-Music-Player-main/test copy.py”, line 194, in <module> for no, name in enumerate(song_list): ~~~~~~~~~^^^^^^^^^^^ TypeError: ‘function’ object is not iterable. How do I fix? This is a downloaded python script btw submitted by /u/MusicAnime [link] [comments]
for no, name in enumerate(song_list):
if name.endswith(“.txt”) or name.endswith(“.skysheet”):
print(f”{no+1}) {name.split(‘.’)[0]}”)
——————
Please select a song with the corresponding number.
Traceback (most recent call last):
File “/Users/XXX/Downloads/Sky-Music-Player-main/test copy.py”, line 194, in <module>
for no, name in enumerate(song_list):
~~~~~~~~~^^^^^^^^^^^
TypeError: ‘function’ object is not iterable. How do I fix? This is a downloaded python script btw
submitted by /u/MusicAnime
[link] [comments]