Indentation İle İlgili Bi Soru
-
Muridler benim indentation ile ilgili basit bi sorum olacak.Hocanin derste yazdigi kod su:
import bottle
@bottle.route("/hello")
def say_hello():
output = """
<html>
<head>
<title>Hello</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<p>Hello world!</p>
</body>
</html>
"""
return output
bottle.run(host='localhost', port=8080)Benim yazdigim kod ise su:
import bottle
@bottle.route("/hello05")
def say_hello():
output = """
<html>
<head>
<title>What the fuck is wrong with people?</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<p>Hello World!</p>
</body>
</html>
"""
return output
bottle.run(host="localhost",port=8080)Benim anlamadigim kisim da su:Hocanin kodunda return output kismi satirin baslangicindan itibaren 4 space.Benim kodumdaki space sayisi ise 8.8 yapmazsam olmuyo,calismiyo kod.Nedir bunun sebeb i hikmeti?Yardimlariniz icin simdiden sagolun.
-
Yardimci olabilecek murid yok mu ?