In this article, we will sort a list according to the second element in the sublist. Let’s say we have the following list − [['jack', 50], ['antony', 20], ['jones', 87], ['gary', 70], ['tom', 90], ['sam', 110], ['warner', 65]] The output should be the following i.e. sorted according to the second element − [['antony', 20], ['jack', 50], ['warner', 65], ['gary', 70], ['jones', 87], ['tom', 90], ['sam', 110]] Python program to sort a list according to the second element in the sublist using the sort() method Example # Custom Function def SortFunc(sub_li): sub_li.sort(key = lambda x: x[1]) return sub_li ... Read More
Both Routers and Bridges are network connecting devices. Routers work at the network layer and are responsible to find the shortest path for a packet, whereas Bridges connect various devices in a network. Routers connect devices across multiple networks. Read through this article to find out more about routers and bridges and how they are different from each other. What is a Router? A router is a networking device that receives, processes, and sends data packets from one computer network to another. On the Internet, routers are in charge of traffic steering. Data packets are used to send data across ... Read More
In this article, we will count the elements in a list until an element is a Tuple. The list is the most versatile datatype available in Python, which can be written as a list of commaseparated values (items) between square brackets. Important thing about a list is that the items in a list need not be of the same type. A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists. The main difference between the tuples and the lists is that the tuples cannot be changed unlike lists. Tuples use parentheses, whereas lists use square ... Read More
A Metropolitan Area Network (MAN) is a medium-sized network but it covers a larger area than a LAN. It often covers multiple cities or towns. In contrast, a Wide Area Network (WAN) is a much larger network than LAN and MAN. A WAN in general is a network of local area networks (LANs) that link to other LANs via telephone lines and radio waves. Go through this article to find out more about MAN and WAN and how they are different from each other. What is a Metropolitan Area Network (MAN)? A MAN is comparable to a ... Read More
LANs are privately owned and span a smaller geographical area (restricted to a few kilometers). It can be used in various settings, including offices, residences, hospitals, and schools. The setup and management of a LAN is quite straightforward. Just like a traditional wired LAN in which the connected devices transmit data over Ethernet cables, whereas in a WLAN, the connected devices transmit data through Wi-Fi. Mobile users can connect to a WLAN through wireless connection. The IEEE 802.11 group of standards describe the technologies for LANs. Go through this article to find out more about LAN and WLAN ... Read More
We will see how to count occurrences of an element in a Tuple. A tuple is a sequence of immutable Python objects. Let’s say we have the following input, with the occurrences of 20 to be checked − myTuple = (10, 20, 30, 40, 20, 20, 70, 80) The output should be − Number of Occurrences of 20 = 3 Count occurrence of an element in a Tuple using for loop In this example, we will count the occurrences of an element in a Tuple − Example def countFunc(myTuple, a): count = 0 for ele in myTuple: ... Read More
As an analogy, we can think of connection-oriented services as telephone systems, where a connection needs to be established between a sender and a receiver before they can exchange data. In contrast, connection-less services are like traditional postal systems where data exchange can take place between a sender and a receiver without establishing a connection. Go through this article to find out the major differences between connection-oriented and connection-less services. What is Connection-oriented Service? A connection-oriented service is a data transfer mechanism used at the session layer. In contrast to its opposite, connectionless service, connection-oriented service necessitates establishing a session ... Read More
Wireless WAN is a type of WAN that uses only wireless connections. A WAN in general is a network of local area networks (LANs) that link to other LANs via telephone lines and radio waves. WANs can also use wired connections. Go through this article to find out more about WAN and Wireless WAN and how they are different from each other. What is a WAN? A WAN (Wide Area Network) is a computer network that connects multiple locations across a large geographic area, albeit it may be limited to the boundaries of a state or country. It can be ... Read More
Static Routing or Non-Adaptive Routing follows user-defined routing. Here, the routing table is not changed until the network administrator changes it. Static Routing uses simple routing algorithms and provides more security than dynamic routing. Dynamic Routing or Adaptive Routing, as the name suggests, changes the routing table if there is any change in the network topology. During network change, dynamic routing sends a signal to router, recalculates the routes and sends the updated routing information. Read through this article to find out how Static Routing differs from Dynamic Routing. What is Static Routing? One of the essential techniques ... Read More
Static IP Address and Dynamic IP Address are both used to identify a computer on a network or on the Internet. Static IP address is provided by the Internet Service Provider and remains fixed till the system is connected to the network. Dynamic IP address is provided by the DHCP, generally a company gets a single static IP address and then generates the dynamic IP address for its computers within the organization's network. Read through this article to find out more about static and dynamic IP addresses and how they are different from each other. What is ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP