Today when using Python splicing strings encountered a problem, the data from the database and the time taken to get the data to spell a string a, the string A and the custom string B splicing has been interrupted, unable to continue execution, no error, Trying to get the database out of the data into a custom put to another file, and then try to print out the type of each string, the result is that the timestamp type is float, the database fetch data type is Unicode, and the custom string type is str, Different types of data can not be directly spliced together, you need to convert its first to the same type and then splicing.
T=time.time () h1= ' my Test 1 ' str1=h1+str (t)
Python converts other types to STR only requires a single statement to be implemented, STR (variables that need to be converted)
Python string Addition problem