[英]How to stack print and input on the same line
所以我想做的只是那個例子:
Print ('6 is between:') , p=int(input()),print('and:'), g=int(input())
最終將是-6介於(輸入)和(輸入)之間任何建議請
您甚至可以使用此代碼設置數字並檢查語句是否為真!
num = 6
a = int(input())
b = int(input())
print(str(num) + ' is between ' + str(a) + ' and ' + str(b))
print((a <= num) and (b >= num)) # Check if the input is True or False
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.