New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Week 9 Notes

by: Eunice

Week 9 Notes CS 1110-002


Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Lists and Strings Using Text Files
Intro to Computing using Python
Lee, Van Loan
Class Notes
CS, Python
25 ?




Popular in Intro to Computing using Python

Popular in ComputerScienence

This 2 page Class Notes was uploaded by Eunice on Monday April 4, 2016. The Class Notes belongs to CS 1110-002 at Cornell University taught by Lee, Van Loan in Spring 2016. Since its upload, it has received 12 views. For similar materials see Intro to Computing using Python in ComputerScienence at Cornell University.

Similar to CS 1110-002 at Cornell


Reviews for Week 9 Notes


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 04/04/16
CS 1110 Van Loan and Lee Spring 2016 March 22, 2016  lists: o when applying the list method “extend”, you need to put a list in the argument/parameter otherwise an error is returned o you can alphabetize a list of strings using sort o strings vs. lists of characters o sum() does not concatenate the strings in a list of strings o consider  “s= [‘cat’, ‘dog’, ‘mouse’]  c=s[2][1:3]”  same as  “s= [‘cat’, ‘dog’, ‘mouse’]  t=s[2]  c=t[1:3]”  they both assign ‘ou’ to c  Nested loops o a loop whose body contains another loop March 24, 2016  lists of strings o slicing works to isolate strings in a list  [] is an empty list  be careful with syntax, [ indicates a list  s.sort() (remember this sorts a list)  text file o lists store tons of data in files o to open a file  name of file is passed as a string  file must be in the same directory as the code that reads it  open(‘nameoffile.txt’,’r’) as F  F is the name  r means read o s as a name of a string  s.rstrip()  removes a line o split method  s.split()  when applied, it will create a list out of string s and the list can be assigned to a variable  the blank in the argument is the delimiter and tells the method where to split the string  readme file o says how data is arranged so that user will know how to use a .csv file  steps to use a file for computation o download a file o name the file and put it in a directory with the code o do the computation  comparing lists o == to compare if two lists have same length and data o can’t use <= or >= etc  aliasing o two variables refer to the same object (the same list)  an object is aliased when it has more than one name  void functions return None


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Jennifer McGill UCSF Med School

"Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.