Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #open file as read
- #create a variable to hold a line
- #empty list
- #create variables for first index and last index
- #0-40 characters
- #create a current line variable that reads each line from 0:40
- #create a loop that loops until the current line variable is equal to 0
- #3 variables for first name, last name, and birthday at their given indexes
- #[0:16], [16:32], [32:40]
- #conditional statements to check to see if a stripped first name and a stripped last name == F and L respectively
- #set birthday = B
- #create a result variable that concatenates first name, last name, and birthday
- #append the variable to our list
- #update first and last index variables
- #update the current line variable with the new indexes
- #close the file
- #open file to write to
- #loop through the list we created with the birthdays
- #write each element to our file
- #close the file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement