Python Forum
Python object that returns tuples?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python object that returns tuples?
#2
See the CSV module...

import csv
with open('parts.dat') as csvfile:
    r=csv.reader(csvfile,delimiter=',')
    for line in r:
        print tuple(line)
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Messages In This Thread
RE: Python object that returns tuples? - by Ofnuts - Mar-27-2017, 12:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How returns behave in a function with multiple returns? khasbay 1 315 May-19-2024, 08:48 AM
Last Post: deanhystad
  python update binary object (override delivered Object properties) pierre38 4 1,951 May-19-2022, 07:52 AM
Last Post: pierre38
  Annualised returns in python. Urgent request shivamdang 2 2,300 Apr-12-2020, 07:37 AM
Last Post: shivamdang
  Python function returns inconsistent results bluethundr 4 3,412 Dec-21-2019, 02:11 AM
Last Post: stullis
  class returns NoneType Object istemihan 0 2,360 Aug-12-2019, 11:47 AM
Last Post: istemihan
  Python returns generator instead of None Tawnwen 4 4,945 Mar-09-2018, 07:06 AM
Last Post: DeaD_EyE
  want to know the kind of object whether its a python or json object johnkennykumar 5 81,331 Jan-21-2017, 08:47 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