Python Forum
Need help improving function that reads file into list of tuples
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help improving function that reads file into list of tuples
#7
As mentioned above, you really don't need to convert the string "0" to an integer on lines 5 and 7. Just use an integer 0!
Reply


Messages In This Thread
RE: Need help improving function that reads file into list of tuples - by ndc85430 - Nov-03-2020, 04:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Adding values with reduce() function from the list of tuples kinimod 10 2,739 Jan-24-2023, 08:22 AM
Last Post: perfringo
Question convert unlabeled list of tuples to json (string) masterAndreas 4 7,510 Apr-27-2021, 10:35 AM
Last Post: masterAndreas
  Count number of occurrences of list items in list of tuples t4keheart 1 2,404 Nov-03-2020, 05:37 AM
Last Post: deanhystad
  Improving my understanding of functions and methods menator01 2 2,165 Apr-24-2020, 06:26 AM
Last Post: menator01
  Dictionary and tuples list comprehensions help paul41 2 2,418 Nov-29-2019, 06:59 PM
Last Post: perfringo
  Writing list as a file, then reading that file as a list Zoastria_Balnala 3 2,629 Oct-17-2019, 07:54 PM
Last Post: Zoastria_Balnala
  I created a function that generate a list but the list is empty in a new .py file mrhopeedu 2 2,332 Oct-12-2019, 08:02 PM
Last Post: mrhopeedu
  Converting List into list of tuples ARV 4 4,805 Sep-28-2019, 04:58 AM
Last Post: perfringo
  Improving code to autorename if filename exists Den0st 5 3,022 Sep-23-2019, 07:53 AM
Last Post: wavic
  reading txt file putting in list function Expel 7 3,813 Jul-17-2019, 03:18 PM
Last Post: Expel

Forum Jump:

User Panel Messages

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