katiash / novTryPy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

novTryPy

With your group, create a cheat sheet to easily look up common string and list methods in Python. Include comments describing what the method does and any notes you may want to remember for the future, then provide an example in Python code. For example, if I wanted to remember how to iterate through a list in Python, I may write the following:

# To iterate through each element in a list, use the "for-in" loop. The variable defined is the placeholder for each value.
# The following will print each name in the "characters" list
characters = ["Rick", "Morty", "Summer", "Beth", "Jerry"]
for person in characters:
    print person

Include the following string methods:

  • capitalize
  • upper
  • lower
  • count
  • find
  • index
  • split
  • join
  • replace
  • format

You may find information about string methods here

Include the following list methods:

  • len
  • max
  • min
  • index
  • append
  • pop
  • remove
  • insert
  • sort
  • reverse
  • extend

You may find information about list methods here

About


Languages

Language:Python 100.0%