Jan-05-2020, 12:53 AM
You should look into the format method of strings, or the even newer f-string syntax (Python 3.6+).
# format method current_sound = playsound("C:/Users/thoma/Desktop/test/{}.mp3".format(item_list[current_item_index]["som"])) # f-string current_sound = playsound(f"C:/Users/thoma/Desktop/test/{item_list[current_item_index]['som']}.mp3")
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures