search
尋找貓咪~QQ 地點 桃園市桃園區 Taoyuan , Taoyuan

Python 同一行書寫多個語句(;)隔開 – jashliao部落格

Python 同一行書寫多個語句(;)隔開

 

 

資料來源: https://github.com/stormzhang/free-programming-books/blob/master/assets/python/Python核心编程(中文第二版)带目录.pdf 的p62~p63

 

# -*- coding: UTF-8 -*-

#Python 程式過長時的換行語法[\] + 同一行書寫多個語句(;)隔開

weather_is_hot=1;shark_warnings=0

if (weather_is_hot == 1) and \

(shark_warnings == 0):

    print(shark_warnings);

    print(weather_is_hot);

 

 

 

 

 

 



熱門推薦

本文由 jashliaoeuwordpress 提供 原文連結

寵物協尋 相信 終究能找到回家的路
寫了7763篇文章,獲得2次喜歡
留言回覆
回覆
精彩推薦