Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

// operator use in python

#One thing to note- since Python treats all numbers as floats (decimal numbers),
#you can use the double division sign // to get an integer.
#This is useful for finding indexes.
string1 = "abcde"  
middle = string1[len(string1) // 2]  # 4//2
print(middle) 
# c
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #operator #python
ADD COMMENT
Topic
Name
2+4 =