title: How to check if window is on Fullscreen in Tkinter?
body: <p>I made <strong>F11</strong> toggle fullscreen on. But how can I make it so that <strong>F11</strong> can both toggle fullscreen on and off ?</p>
  
  <p>I tried to make an [if] statement so it will turn it off if the window was previously toggled to fullscreen but I couldn't find a way to check if the window was already toggled or not.</p>
  
  <p>Any help is appreciated, thank you.</p>
  
  <p>Updated Solution :This is the final code that seems to work without a problem.</p>
  
  <pre><code>def toggle_fullscreen(event):
  if (root.attributes('-fullscreen')):
      root.attributes('-fullscreen', False)
  
  else:
      root.attributes('-fullscreen', True)
  root.bind("&lt;F11&gt;", toggle_fullscreen)
  </code></pre>