Python Forum
struggling with one part of python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
struggling with one part of python
#21
months_name[4, 5, 6]

the_months = int(the_date_arr[4, 5, 6])

nvm has to be integer or slice
Reply
#22
How do you expect that to work? If you want to extract multiple values, then you either need to use a loop or a slicing operation (like you would on a list).
Reply
#23
wait i think its working, when i put the input the_month it gives me 7


Existing data table :
>>> the_month_name
'January'
>>>

wait that not right cant be typing that -.- my head

ima take a break, ty for your help and time, ill be back. i have a head ache, been at this all day
Reply
#24
@Lucifer, remember to use proper code tags. See BBCode for more help
pyzyx3qwerty
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Struggling on Tuples Mystix 3 6,013 Feb-01-2021, 06:06 PM
Last Post: nilamo
  Struggling with variables pythonstudy00 1 2,020 Sep-23-2020, 06:39 AM
Last Post: DPaul
  Struggling To Understand These 2 Python Files samlee916 2 2,659 Sep-22-2020, 04:50 AM
Last Post: ndc85430
  struggling w/ fonctions in Python Tiril123 7 4,978 May-09-2020, 10:51 AM
Last Post: pyzyx3qwerty
  How to change part of the value string in Python Dictionary? sbabu 11 5,707 Feb-12-2020, 02:25 AM
Last Post: sbabu
  struggling with python save/load function newatpython00 1 2,534 Nov-15-2019, 07:58 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020