[Learning] python string Related

# - * - Coding: UTF-8 - * - 
# ===================================== ======================================== 
# Ctrl + 1: comment / uncomment 
#  
# the Ctrl + of 4/5: block comment / trans comment block 
#  
# the Ctrl + L: jump to the line number 
#  
# the Tab / the Shift the Tab +: code indentation / trans indent 
# ============== ================================================== ================= 

for I in Range (128 ):
     Print (. CHR (I) __repr__ (), End = "  " ) 

Print (type ( ' A ' )) 

Print ( "The My Bone'm of the I Sword. \ My body and nSteel IS ... " ) 

Print ( " Chrom \ TSTART \ TEND \ tstrand \ tname \ tscore " )
 Print ( " CHR1 \ t520000 \ t530000 \ T + \ tgene1 \ T0 " )
 Print ( " \\ " ) 

chr_, Start, End = " CHR1 " , 1000, 2000 
tmpl = " gene1 \ nchromosome \ T {} \ Nstart \ T {} \ Nend \ T {} " 
# this defines a template, {} will be replaced when the placeholder in the format 
Print (tmpl.format (chr_, Start, End)) 

BS = B "this is a bytes"
print(type(bs))
print(bs)

#s = "hello world"
#print(s)
#s.encode('utf-8').decode('utf-16')
#print(s)

l1 = [1, "this is a str", 1.114, True]
print(l1[1:3])

 

result:

Guess you like

Origin www.cnblogs.com/acm-icpcer/p/11272514.html