Answers for "passer de python 2 à python 3 shel"

1

typage in python

# for a string named str1
str1: str = "this is a string"
#for an int named toto
toto: int
#and it works for every types (str, int, floats, dict...)
Posted by: Guest on May-25-2020
0

str.format python 3

print("Sammy ate {0:f} percent of a {1}!".format(75, "pizza"))
Posted by: Guest on April-30-2020

Python Answers by Framework

Browse Popular Code Answers by Language