Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to compare string
#4
(Jan-17-2019, 06:08 PM)ichabod801 Wrote: ";Day1=13/10/18;Day2=14= Shift;Time11=15:17;PRICE=10"
done here
# Input string.
Input_string = ";Day1=13/10/18;Day2=14= Shift;Time11=15:17;PRICE=10"

# Separate on comma.
Separate_comma = Input_string.split(";")

# Loop and print each city name.
for string in Separate_comma:
    print(string)
output
Day1=13/10/18
Day2=14= Shift
Time11=15:17
PRICE=10
How to compare present and previous date ?
How to compare p and previous time ?
How to compare present and previous price ?
Reply


Messages In This Thread
How to compare string - by Rehan11 - Jan-17-2019, 06:03 PM
RE: How to compare string - by ichabod801 - Jan-17-2019, 06:08 PM
RE: How to compare string - by metulburr - Jan-17-2019, 10:53 PM
RE: How to compare string - by Rehan11 - Jan-19-2019, 03:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to compare string values in an if statement israelsattleen 1 590 Jul-08-2023, 03:49 PM
Last Post: deanhystad
  how to compare some string with the database columns nick123 1 1,917 Apr-21-2019, 05:27 PM
Last Post: ichabod801
  Does Python 3.x have a built-in byte string compare function? Raptor88 2 16,497 Feb-18-2017, 10:44 AM
Last Post: Raptor88

Forum Jump:

User Panel Messages

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