Skip to content Skip to sidebar Skip to footer
Showing posts with the label String Formatting

Optional Keys In String Formats Using '%' Operator?

Is is possible to have optional keys in string formats using '%' operator? I’m using the lo… Read more Optional Keys In String Formats Using '%' Operator?

Python 3 Format Method - Tuple Index Out Of Range

I have a problem with the format method in Python 3.4.2. Shows me the following error: Traceback (… Read more Python 3 Format Method - Tuple Index Out Of Range

Fastest Way To Insert These Dashes In Python String?

So I know Python strings are immutable, but I have a string: c['date'] = '20110104'… Read more Fastest Way To Insert These Dashes In Python String?

Python 2.6+ Str.format() And Regular Expressions

Using str.format() is the new standard for formatting strings in Python 2.6, and Python 3. I've… Read more Python 2.6+ Str.format() And Regular Expressions