Class Notes (835,048)
Canada (508,891)
CSC108H1 (113)
Lecture

october 05 notes

1 Page
73 Views
Unlock Document

Department
Computer Science
Course
CSC108H1
Professor
Michelle Craig
Semester
Fall

Description
 If comment tells nothing more than the statement out of context = useless  Before & aside the statement >>> for char in s:  Strings >>> s = “michelle” … “print something” >>> x = “ch” … print s >>> x in s # boolean expression „print something‟ True michelle >>> it_appears = x in s „print something‟ >>> it_appears michelle True „print something‟ michelle >>>> type(it_appears) „print something‟ michelle 1. If x in s: „print something‟ 2. Print „yes‟ michelle 3. else: „print something‟ 4. print „nope‟ michelle „print something‟ Output: yes michelle „print something‟ >>> if it _appears: michelle … print “this is the same” >>> len(s) this is the same
More Less

Related notes for CSC108H1

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit