I'm using python3.6. I'm trying to print some text and a result of a function on one line.
print("Type of partition:")
type_of_partition(partentry)
This gives me:
Type of partition:
FAT 16
but I want them on the same line as it looks friendly. I tried
print("Type of partition: ", type_of_partition(partentry))
this gives me:
Type of partition: None
FAT 16
I tried:
print("Type of partition: %s" % type_of_partition(partentry))
this gives me:
FAT 16
Type of partition: None
How can I put them together?
将type_of_partition
函数的print result
更改为return result
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.