{"id":5273,"date":"2026-04-01T06:04:51","date_gmt":"2026-04-01T04:04:51","guid":{"rendered":"https:\/\/www.elektronik-kompendium.de\/news\/?p=5273"},"modified":"2026-01-12T13:05:43","modified_gmt":"2026-01-12T12:05:43","slug":"micropython-variablen-in-funktionen","status":"publish","type":"post","link":"https:\/\/www.elektronik-kompendium.de\/news\/micropython-variablen-in-funktionen\/","title":{"rendered":"MicroPython: Variablen in Funktionen"},"content":{"rendered":"<p>Variablen, die au\u00dferhalb von Funktionen erstellt werden, k\u00f6nnen lesend verwendet werden, jedoch nicht ohne weiteres ge\u00e4ndert. Um eine globale Variable zu \u00e4ndern, kann das Schl\u00fcsselwort &#8222;global&#8220; verwendet werden oder die Variable kann als Parameter \u00fcbergeben und zur\u00fcckgegeben werden. Letzteres gilt als die bessere Praxis.<\/p>\n<ul>\n<li><a href=\"\/sites\/raspberry-pi\/3005221.htm\">MicroPython: Variablen in Funktionen<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Variablen, die au\u00dferhalb von Funktionen erstellt werden, k\u00f6nnen lesend verwendet werden, jedoch nicht ohne weiteres ge\u00e4ndert. Um eine globale Variable zu \u00e4ndern, kann das Schl\u00fcsselwort &#8222;global&#8220; verwendet werden oder die Variable kann als Parameter \u00fcbergeben und zur\u00fcckgegeben werden. Letzteres gilt als die bessere Praxis. MicroPython: Variablen in Funktionen<\/p>\n","protected":false},"author":1,"featured_media":4921,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[1616,1449,1614],"_links":{"self":[{"href":"https:\/\/www.elektronik-kompendium.de\/news\/wp-json\/wp\/v2\/posts\/5273"}],"collection":[{"href":"https:\/\/www.elektronik-kompendium.de\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elektronik-kompendium.de\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elektronik-kompendium.de\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elektronik-kompendium.de\/news\/wp-json\/wp\/v2\/comments?post=5273"}],"version-history":[{"count":0,"href":"https:\/\/www.elektronik-kompendium.de\/news\/wp-json\/wp\/v2\/posts\/5273\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.elektronik-kompendium.de\/news\/wp-json\/wp\/v2\/media\/4921"}],"wp:attachment":[{"href":"https:\/\/www.elektronik-kompendium.de\/news\/wp-json\/wp\/v2\/media?parent=5273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elektronik-kompendium.de\/news\/wp-json\/wp\/v2\/categories?post=5273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elektronik-kompendium.de\/news\/wp-json\/wp\/v2\/tags?post=5273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}