String Formatting Operator #!/usr/bin/python3 print ("My name is %s and weight is %d kg!" % ('Zara', 21)) %c character %s string conversion via str() prior to formatting %i signed decimal integer %d signed decimal integer %u unsigned decimal integer %o octal integer %x hexadecimal integer (lowercase letters) %X hexadecimal integer (UPPERcase letters) %e exponential notation … Continue reading python2
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed