Python Forum
simple list check with loops
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simple list check with loops
#21
(Jan-08-2017, 12:21 PM)Larz60+ Wrote: Was the file originally created as JSON? if not, you cannot read it as such.
It will have to be converted.

Rather than posting graphics, please useĀ output tags
tags for tracebacks. You can cut and paste the data

Images look messy and are undesirable

Will do Larz, thank you. Also it was originally created as a as a JSON, I'll figure it out and leave you guys be for now. I did however buy PYTHON CRASH COURSE by Eric Matthes. I like the book but I'm trying to find something kind of like a python exercise book that I can do. If anyone has any good ideas I'm willing to listen. Also I made an IRC account. Lol
Reply
#22
Also notice snippsat's note, I had a read in the code I submitted that wasn't necessary.
Reply
#23
Indeed I noticed his note. Though I don't understand why reading the file in isn't needed?
Reply
#24
if you pass the file handle to json (load or dump) it will do the read and write, you don't have to
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with to check an Input list data with a data read from an external source sacharyya 3 318 Mar-09-2024, 12:33 PM
Last Post: Pedroski55
  [solved] list content check paul18fr 6 616 Jan-04-2024, 11:32 AM
Last Post: deanhystad
  for loops break when I call the list I'm looping through Radical 4 826 Sep-18-2023, 07:52 AM
Last Post: buran
  How to solve this simple problem? Check if cvs first element is the same in each row? thesquid 2 1,182 Jun-14-2022, 08:35 PM
Last Post: thesquid
  check if element is in a list in a dictionary value ambrozote 4 1,882 May-11-2022, 06:05 PM
Last Post: deanhystad
  How to check if a list is in another list finndude 4 1,793 Jan-17-2022, 05:04 PM
Last Post: bowlofred
Question Problem: Check if a list contains a word and then continue with the next word Mangono 2 2,455 Aug-12-2021, 04:25 PM
Last Post: palladium
  Using recursion instead of for loops / list comprehension Drone4four 4 3,073 Oct-10-2020, 05:53 AM
Last Post: ndc85430
  how to check if string contains ALL words from the list? zarize 6 7,044 Jul-22-2020, 07:04 PM
Last Post: zarize
  Creating a List with many variables in a simple way donnertrud 1 2,014 Jan-11-2020, 03:00 PM
Last Post: Clunk_Head

Forum Jump:

User Panel Messages

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