Lesson 6 of 6

Strings: எழுத்துகளுடன் விளையாடுவோம்Strings: Playing with Text

9 min 20 XP

Strings-க்கு பல பயனுள்ள tools உண்டு: upper() பெரிய எழுத்துகளாக்கும், lower() சிறிய எழுத்துகளாக்கும், len() எழுத்துகளின் எண்ணிக்கையைத் தரும்.

Strings come with useful tools: upper() makes capitals, lower() makes small letters, and len() counts the characters.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

f-string மூலம் variables-ஐ நேரடியாக எழுத்துக்குள் வைக்கலாம்: quotes-க்கு முன் f எழுதி, variable-ஐ { } உள்ளே வையுங்கள்.

With an f-string, you can put variables straight into text: write f before the quotes and put the variable inside { }.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

Index 0-ல் தொடங்கும்: name[0] முதல் எழுத்து, name[-1] கடைசி எழுத்து.

Indexes start at 0: name[0] is the first character and name[-1] is the last.