Python allows you to use + and * with strings. When used with strings, + joins two strings together:
patientname = "John Doe" patientid = "42113" info = patientname + " " + patientid # info now contains "John Doe 42113"
The * operation specifies multiple copies of a string. For example:
patientid = "4" + "2" + 2 * "1" + "3" # patientid now contains "42113"
As with numbers, * is always performed before +, unless parentheses are used to specify the order.