How to format strings(text) in python? like bold, italic etc! | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

How to format strings(text) in python? like bold, italic etc!

am using python3.5 in Windows7!! am a beginner

26th Sep 2016, 2:31 PM
Roan
Roan - avatar
7 Réponses
+ 11
Sorry to disappoint you, but can't format text in Python. If you want to, start learning HTML, CSS, JavaScript and jQuery. HTML supplies the layout, CSS supplies the styles, JavaScript and jQuery adds new features. Hope this helps edwin
8th Sep 2017, 11:00 AM
Edwin Pratt
Edwin Pratt - avatar
+ 1
you can't do it in console. If you're developing a website or. any GUI software then it is possible.
26th Sep 2016, 3:48 PM
Anshul Bansal
+ 1
Thanks!!! What i need for that?? Means software???
27th Sep 2016, 3:36 AM
Roan
Roan - avatar
+ 1
depends on what format your saving/displaying in. Websites usually display in HTML format where you use markup to say now we're using italics and later ok you can stop using italics now, I think there's a separate course from solo learn for HTML, and you could use python to create HTML (although there are also already frameworks like django built for this that are already built that you could tweak). You can also display HTML in apps. Building an app that mostly displays HTML is known as developing a hybrid app. There are also other formats for storing text that allow for bold and italics etc, like Microsofts .doc format.
27th Sep 2016, 2:05 PM
Phil
Phil - avatar
+ 1
Despite what many are saying here, yes, you can probably format console text as far as bold, italics, and colors go, all in the terminal. In Ruby, it requires a gem; I'd imagine in Python it would also require a library for formatting, or you could also possibly learn ANSI escape sequences, which may allow you to format text directly from Python.
9th Sep 2017, 11:41 AM
Chris L.
+ 1
How can I print bold in python?
11th Mar 2018, 1:55 AM
Mekie
0
LEARN IT NOOOOOB
14th Nov 2019, 1:20 PM
Mario