TristanSld

index and count methods in tuples

Jan 9th, 2014
58
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. #-*-coding:utf-8-*-
  3. demet="gül","papatya","kasımpatı","papatya","erguvan"
  4. print demet.index("gül"),"\n"
  5. print demet.count("papatya")
RAW Paste Data