1#!/usr/bin/python
2
3str = " this is string example....wow!!! ";
4print str.rstrip()
5str = "88888888this is string example....wow!!!8888888";
6print str.rstrip('8')
7
8#the answer
9
10#this is string example....wow!!!
11#88888888this is string example....wow!!!
1#use the def keyword to declare a function in Python
2def function(args,kwargs='attribute'):
3 #here is the returned value
4 return 'return value'