Python Programming: TUPLE Data Type

1. What is TUPLE?

Tuple is similar to the list, the difference is that the elements of the tuple cannot be modified, so using tuple can make the code more secure. The tuple uses small brackets, lists the square brackets. TUPLE and LIST can index, slice, while tuple is also an unity list.

2. How to create tuple?

The tuple creation is very simple, only need to add an element in parentheses and use a comma. Let’s create a tuple in several different ways.

TUPLE1=# Create an empty group

Tuple2=(1,) # 不 加加, tuple2 type is integer

TUPLE3=(‘tony’, ‘Tom’, 33, 55) # 元组 can also be different types of data

Tuple4="Hello", "Good", "better", "best" # No need to be brackets

Type (x) uses this built-in method to determine what type of data current X is

3. How do I access the value in Tuple?

TUPLE3 [-1] indicates reverse reading, reading a countdown first element

Tuple3 [0: -2] indicates that reading from the first element to the second element

4. How to modify the value in the TUPLE?

The element value in the tuple is not allowed, but we can get a new TUPLE to achieve the purpose of modifying by intercepting the reputation.

Tuple7 [0]="hi" # This modification is not allowed

Del tuple7 [0] # This deletion is also not allowed.

Del tuple7 # This type of deletion does not exist after taking operation.

5. What are the operators of the TUPLE?

This section is the same as the List of the previous chapter.

6. What are the common built-in functions ofTUPLE?

The TUPLE built-in function is the same as the List, and is only part.

Note: The tuple method can convert a list into a tuple type, see the tuple8 tuple in the figure.

Summary: Today, the definition characteristics of TUPLE this type of data are mainly told and the difference between the difference, creation, value, update deletion, the use of operators, and the simple use of commonly used functions.

A Novelty story: action, climax & the end

In 1958, the Bharatiya Jana Sangh, the precursor to the BJP, lost the Delhi civic polls it contested. The evening of the results, its top leaders, L K Advani and Atal Bihari Vajpayee, friends and confidants, watched Raj Kapoor’s Phir Subah Hogi at Paharganj’s Imperial cinema.

Advani had narrated this at an event in 2011. “We lost. To drown our sorrows, we went to a movie together at Paharganj’s Imperial cinema. Incidentally, the Raj Kapoor movie was titled Phir Subah Hogi… and we finally came to power at the Centre.”

Such was the enduring charm of cinema. But that was another era, when cinema held centre stage, before plush seats and popcorn in tubs changed the movie-watching experience. Those were the days of wooden seats and 35mm projectors, of groundnuts in paper cones and hooting crowds.

The demolition last year of another single-screen hall, Old Delhi’s Novelty cinema, a few kilometres from Imperial and one of the oldest and earliest cinemas of the Capital, further brought the curtains down on that era. Recently, the North Delhi Municipal Corporation, which owns the property, leased out the 1,157-square-metre plot to a private player for Rs 35 crore for 99 years.

The Corporation, which owns the property, is said to have been struggling to redevelop it since 2000, when it took over the premises from Vijay Narain Seth.

Seth, now 75, says his father, Jagat Narain Seth, bought Novelty (then called Elphinstone Picture Palace) from the East India Trading Company in 1933. The first movie to be shown here was Night of Love in 1935. “Initially, only English movies used to be screened. Later, my father started screening Hindi films, including Ratan (which ran for 50 weeks in the 1940s), and Kadambari,” he says. There were to be many more — Dilip Kumar’s Andaz, Jugnu and Mughal-e-Azam. Ramesh Sippy’s Sholay ran for three years.

Seth also recalls how Novelty screened Gemini Studios’ Chandralekha, “the first ever south Indian film to be screened in the north”.

“We would show only three-four films a year, while other theatres would change the shows more frequently,” he adds. The last film that had a jubilee run, Seth says, was Sridevi’s Nigahen, in the late 1980s. In 2000, the family had to down the shutters on their six-decade enterprise.

The family-owned two more movie halls in Old Delhi — Jagat near Jama Masjid and Ritz at Kashmere Gate. “All the cinemas at that time were located inside the Walled City, but a little away from the residential areas,” he says.

Initially, when the civic body took over, it wanted to revamp it as a cinema-cum-commercial complex. In 2012, there was even a proposal to convert the Novelty cinema building into a spice market.

However, both the plans failed to take off.

What is left of Novelty is an open ground with rubble and strewn with plastic bags and water bottles and beer cans.

Old-timers from the Fatehpuri area, where Novelty once stood, recall its two waiting halls, where the crowds waited for the next show, “gorging on cream rolls, pastries and cold drinks” in the meantime.

This is the third cinema in the area to be razed. In the 1990s, Jubliee near Chandni Chowk was demolished, and a few years later, New Amar was razed to make space for the Chawri Bazaar Metro Station. In the heydays of single screens, Old Delhi alone had 12. Of those, only four remain operational — Delite, Abhishek, Moti and Ritz.