Python Forum
Help with Python programming
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Python programming
#5
with open('mezz1','r') as f:
    for line in f:
        print line.strip().split(' ')
or using csv module
import csv

with open('mezz1','r') as f:
    for line in csv.reader(f, delimiter=' '):
        print line
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
Help with Python programming - by mediaos - Aug-08-2018, 03:37 AM
RE: Help with Python programming - by Larz60+ - Aug-08-2018, 03:46 AM
RE: Help with Python programming - by mediaos - Aug-08-2018, 12:54 PM
RE: Help with Python programming - by j.crater - Aug-08-2018, 12:58 PM
RE: Help with Python programming - by buran - Aug-08-2018, 01:00 PM
RE: Help with Python programming - by Larz60+ - Aug-08-2018, 01:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Programming robots using Python OscarBoots 5 3,572 Oct-31-2021, 09:38 AM
Last Post: Larz60+
  Programming Difficult math in Python Huntern 6 4,923 Oct-17-2019, 06:32 AM
Last Post: Huntern
  Inconsistency in Python programming language? newbieAuggie2019 31 11,949 Oct-06-2019, 03:21 PM
Last Post: adt
  Python Programming Projects for Beginners jack_sparrow007 3 3,395 Dec-26-2018, 07:52 PM
Last Post: micseydel
  Programming Python as a MS Windows app? Brian123 8 4,437 Oct-17-2018, 10:26 PM
Last Post: Brian123

Forum Jump:

User Panel Messages

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