Python Forum
hardest week yet: some guidence please
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hardest week yet: some guidence please
#15
(Aug-17-2019, 01:43 PM)ichabod801 Wrote: Just add five to start. Don't slice something else. Add five to start. And that's assuming you are searching for 'user', so you need 5 characters to get past 'user '. If you are going to change the string you are searching for to 'Invalid user', you need to account for the extra length of that string. So you would need to add 13 to start. Note that if you were to slice 'Invalid user' by 13, you would get nothing. That's why you don't do that.

I know that is what I need to do I just cant figure out were it goes

start = line.find("invalid user")
I have tried it in many different places in the code
Reply


Messages In This Thread
RE: hardest week yet: some guidence please - by raymond2688 - Aug-17-2019, 02:33 PM
slice help - by raymond2688 - Aug-17-2019, 12:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calculating the number of day of the week RbaPhoenix 3 2,541 Mar-27-2020, 09:23 PM
Last Post: Larz60+
  week 1 python help - string formatting ? raymond2688 20 8,003 Jul-09-2019, 08:10 PM
Last Post: snippsat
  Trying to get the week number from a string of numbers fad3r 2 3,253 Apr-15-2018, 06:52 PM
Last Post: ljmetzger

Forum Jump:

User Panel Messages

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