簡體   English   中英

為什么我不能在 1 行中使用 python 打印句子和變量值?

[英]why i cant print sentence and variable value in 1 line use python?

我嘗試用python計算可用子網。 只是簡單的調用但錯誤。

    print ("the IP is valid")
    result = (2 ** (32 - int(mask)) - 2)
    print ("net available: ".format(result))
print ("the IP is valid")
result = (2 ** (32 - int(mask)) - 2)
print ("net avaiable: {0}".format(result))

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM