Sep-17-2019, 03:06 AM
(This post was last modified: Sep-17-2019, 03:09 AM by newbieAuggie2019.)
Hi!
Due to time constraints, I'm working with a lot of issues at the same time: f-strings, functions, loops... and I was wondering... with so many formatting ways, is there a straightforward way to format the text of a string with characteristics like font type, bold, italics, underlined, size, colour, etc. in a similar way with tags, like in here?:
Due to time constraints, I'm working with a lot of issues at the same time: f-strings, functions, loops... and I was wondering... with so many formatting ways, is there a straightforward way to format the text of a string with characteristics like font type, bold, italics, underlined, size, colour, etc. in a similar way with tags, like in here?:
print("\n\nThis is a [b]test[/b] \ to [color=red]check[/color] and [size=8]other[/size]\ [font=Tahoma]formatting[/font]types.")That little program produces the following failed formatted string test:
Output:This is a [b]test[/b] to [color=red]check[/color] [size=8]other[/size][font=Tahoma]formatting[/font]types.
All the best,
newbieAuggie2019
"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs