Python Archive
Boolean methods – String validation methods: String is an Object String object is providing pre-defined methods to validate the string. These methods are called Boolean methods, these methods always return a Boolean value (True or …
Old Style formatting: We can display string after formatting Python supports C style of formatting using access specifiers. Format specifiers like int(%d), float(%f), String(%s) can be used. We can also concatenate strings using plus(+) operator. …
Displaying Strings with Quotes: Generally a string can be represented in python using single or double quotes. #Output : It is ‘Python’ online session #Output : It is “Python” tutorial # Output : She said, …
Immutability: Python is Object oriented programming language. Any information(Number, String or Collection) stores in Object format only. Object behavior is either Mutable or Immutable. Immutable objects : Numbers , Strings and Tuples Mutable Objects : …
tkinter: “tkinter” is a pre-defined module “tkinter” providing set of classes to implement GUI applications. “Tk” is the pre-defined class belongs to “tkinter” module. Object creation (instantiation) of Tk class results a Frame. We can …
We need to import Tk class from tkinter module. Instantiation of Tk class results a “window. The following code snippet display the frame with title ‘tk’ We can write GUI programs without using classes(object orientation). …
Components: We design the form using components like Button, Label, Entry filed…. Components are pre-defined classes belongs to “tkinter” module. After instantiation (object creation) of Component class, we can add to the Frame. Some of …
Layout management: We must use the Layout Management to arrange the components. Using the pre-defined functionality of Component, we can Layout that Component. pack() : Arrange the components one by one sequentially on the window.grid() …
Event Listeners: “Event” is an action performed on component. When action performed(for example Button clicked), it should the execute the functionality. We must define the logic using functions and connect with component. We use “command” …
grid() layout: grid() function arrange the components in a table format(2 dimensional). We need to specify row value and column value of component StringVar class: It is belongs to tkinter module It is used to …