{"id":4065,"date":"2022-01-26T12:28:59","date_gmt":"2022-01-26T12:28:59","guid":{"rendered":"https:\/\/ibex.tech\/python\/?p=4065"},"modified":"2024-11-21T12:36:05","modified_gmt":"2024-11-21T12:36:05","slug":"output-to-console-2","status":"publish","type":"post","link":"https:\/\/ibex.tech\/python\/console-python\/output-to-console-2","title":{"rendered":"Output to console"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>print(\"Hello \" + my_name + \" how are you?\")\n\n#Or you can comma seperate multiple strings and varaibles\nprint(\"Hello\", my_name, \" how are you?\")\n\n#Or put variables in the string\nprint(f\"Hello {my_name} how are you?\")        #&lt;&lt;&lt;&lt;REMEMBER THE LEADING f !!!!<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Clear screen<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>os.system('clear' if os.name == 'posix' else 'cls')  #Clear screen command for different OS<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Clear screen<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[317],"tags":[],"class_list":["post-4065","post","type-post","status-publish","format-standard","hentry","category-console-python"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/comments?post=4065"}],"version-history":[{"count":11,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4065\/revisions"}],"predecessor-version":[{"id":4757,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4065\/revisions\/4757"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/media?parent=4065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/categories?post=4065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/tags?post=4065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}