0

Why is string formatting used and can it be traversed

26th Jul 2019, 6:49 AM
SUNDARAMAN IYER
SUNDARAMAN IYER - avatar
2 Respostas
+ 1
What do you mean by traversed?
26th Jul 2019, 7:07 AM
Trigger
Trigger - avatar
+ 1
String formatting is used to help create readable text output for a positive user experience. There are several ways to traverse text in python as well. x="So long" y="thanks for all the" z="fish" string=f"{x} and {y} {z}" print(string) print('Is "fish" in string:', "fish" in string) You can also index slice, use find and use regex as well
26th Jul 2019, 11:05 AM
Steven M
Steven M - avatar