Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
notation
#3
curr_line[0] is not "19260701" or 19260701', '0.09', '-0.22, '-0.30', '0.009'. It is "19260701,0.09,-0.22,-0.30,0.009\n" because there are no spaces in the str. Maybe you should use split(",")
line = "19260701,0.09,-0.22,-0.30,0.009\n"
print(line.strip().split(","))
Output:
['19260701', '0.09', '-0.22', '-0.30', '0.009']
Reply


Messages In This Thread
notation - by MCL169 - Apr-14-2023, 01:49 AM
RE: notation - by Larz60+ - Apr-14-2023, 02:17 AM
RE: notation - by deanhystad - Apr-14-2023, 03:29 AM
RE: notation - by MCL169 - Apr-14-2023, 04:46 AM
RE: notation - by buran - Apr-14-2023, 06:30 AM
RE: notation - by MCL169 - Apr-14-2023, 10:14 AM
RE: notation - by DeaD_EyE - Apr-14-2023, 10:45 AM
RE: notation - by MCL169 - Apr-14-2023, 12:02 PM
RE: notation - by MCL169 - Apr-14-2023, 12:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Forcing matplotlib to NOT use scientific notation when graphing sawtooth500 4 5,569 Mar-25-2024, 03:00 AM
Last Post: sawtooth500
  ''.join and start:stop:step notation for lists ringgeest11 2 4,053 Jun-24-2023, 06:09 AM
Last Post: ferdnyc
  issue with converting a scientific notation to standard notation thomaswfirth 4 3,249 Jun-06-2023, 06:06 PM
Last Post: rajeshgk
  Issue in writing sql data into csv for decimal value to scientific notation mg24 8 5,978 Dec-06-2022, 11:09 AM
Last Post: mg24
  Graphics Formatting - X-axis Notation and Annotations - Matplotlib silviover_junior 0 2,611 Mar-17-2021, 01:19 PM
Last Post: silviover_junior
  How to understand the byte notation in python3 blackknite 3 4,043 Feb-23-2021, 04:45 PM
Last Post: bowlofred
  Simple question concerning python dot notation. miner_tom 1 2,585 Mar-24-2020, 05:20 PM
Last Post: buran
  how to implement the .mymethod() notation of Python Pedroski55 4 4,614 Apr-22-2019, 10:24 PM
Last Post: Gribouillis
  Object madness - JSON Notation confusion execsys 4 4,811 May-03-2018, 08:56 AM
Last Post: buran
  printing engineering notation Skaperen 1 6,623 Sep-28-2017, 03:40 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

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