User Profile

Collapse

Profile Sidebar

Collapse
ad0033
ad0033
Last Activity: Nov 17 '14, 05:29 PM
Joined: Oct 5 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ad0033
    replied to Splitting Strings in Array and Displaying
    Thank you! I've tried a few things and got the file to open and display all, I'm having a hard time using the individual information from the lines pulled.
    Here's what I have now:

    Code:
    def displayBookMenu():
        print("\n1: Display All Books")
        print("2: Display Shortest")
        print("3: Display Longest")
        print("4: Display Oldest")
        print("5: Display
    ...
    See more | Go to post

    Leave a comment:


  • ad0033
    started a topic Splitting Strings in Array and Displaying

    Splitting Strings in Array and Displaying

    So, I'm trying to take information from bookfile.txt and display information from it. So far, I've opened the file. I'm having trouble getting each line as one object of arrayBooks.

    I'd like to have arrayBooks[0]="Animal Farm,1945,152,G eorge Orwell"

    Then, I'm going to use book1 = arrayBooks[0].split(',') to split it to other information, such as:
    book1[0]="Animal Farm"
    book1[1]=1945...
    See more | Go to post
No activity results to display
Show More
Working...