![]() ![]() The range () function returns a sequence of numbers starting from 0 ending at the integer passed as a parameter. This can be done by using the range () function along with the len () function. Note that you were also printing name. The Python Inde圎rror: list index out of range can be fixed by making sure any elements accessed in a list are within the index range of the list.Best approach: check if string is in format "yyyy-mm-dd" C:/>pip install pyinstaller C:/>pyinstaller yourprogram.py This will create a subdirectory called dist with the yourprogram.exe contained in a folder called yourprogram. Trivial approach: ensure there are at least two "-" characters. The solution I used was to use PyInstaller as an alternative because Py2Exe stopped development at python 3.4 and will not work with newer versions. You ensure to only continue with your elaboration if string matches a given format.See how to bind events to functions in tkinter, such as this answer You bind key pressed (actually key released, to ensure you are looking for the actual entered string) to a checker function show_string.Print('Sorry, today is not your birthday:(') I also have made sure to click on the osu. osr' option, and have also selected the correct beatmap for the 'select mapset' option. is shorter and works the same way And yes, I will do a PR for. Not a major problem but its very, very obvious. scorphus And whats the reason its not thefuck -alias source as it 1. If current_date_lst = b_date and current_date_lst = b_date:Īge = int(current_date_lst) - int(b_date) Ive exported 2 beatmaps replays, only for the numbers on the circles to not show. L2 = Label(t, text='Name of your birthday legend?:').grid(row=2, column=1) L1 = Label(t, text='Sana enter your birthday in yyyy-mm-dd format:').grid(row=1, column=1) (This program is for my best friend's birthday that's tomorrow) import datetimeĬurrent_date = ().strftime('%Y-%m-%d')Ĭurrent_date_lst = current_date.split('-') The error is "Inde圎rror: list index out of range" for line 23 I'm new to python and I wanted to know why my program is not working. fuck Traceback (most recent call last): File " /usr/local/bin/thefuck", line 11, in < module> sys.exit(main()) File " /usr/local/lib/python2.7/dist.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |