![]() ![]() |
| |||||||||
| Hotspots: Slides and Code TA Corner Comments? Announcements FAQ Static Webspace | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
>>>print bar *says to print everything after the first (.) ex: if it was os.listdir(folder) it would be .listdir(folder)
| Remember that rfind searches backward from the end of the string, so foo is the position of the last dot. In the example you give, there's only one dot, so the result is the same anyway. Given that bar = file[foo:], what then is the value of file, and what comes after its last dot? Colin Potts |
| Yes - Bobby Mathew |