swift

Swift dictionary append method explanation with example

Learn how to append data to a swift dictionary. Using a new dictionary key, we can append one new key-value pair to a dictionary in swift.

Read
swift

Swift program to get all keys and values of a dictionary

Swift program to get all keys and values of a dictionary.keys and values are two instance properties of swift dictionary that we can use to get all keys and values.

Read
swift

Three different Swift programs to check if a dictionary contains a key or not

Three different ways to check if a swift dictionary contains a key or not. We can check if the value is nil for a key, we can use if let or index(forKey) method of dictionary.

Read
swift

How to check if an array of integers contains two numbers appeared twice in swift

Swift program to check if an array of integers contains two numbers appeared twice or not. We will use one dictionary to find out the duplicate numbers.

Read
C++

C++ read string with spaces from console

Learn how to read a string with spaces from console in C++. Using cin(), we can't read a string with space in it. But by using getline(), we can do that easily.

Read
python

How to remove https from a url in python

Learn how to remove https from a url in python. We are discussing two different ways in this post. By using the replace() method and by using regex or regular expression.

Read
python

How to find the last occurrence of a character in a python string

How to find the last occurrence of a character in a python string. We will learn two different ways to do that by using rfind() and rindex() method.

Read
python

How to replace date and time of a python datetime object

Learn to replace date and time of a python datetime object. This example will show you how to replace year, month, day, hour, minute, second, microsecond and time zone of a datetime object in python.

Read
python

Python tutorial pretty print JSON to console and file

Learn how to pretty print JSON file in Python. Read JSON and pretty print and write JSON data as pretty print to file.

Read
java

Java program to find the third largest number in an unsorted array

Java program to find the third largest number in an unsorted array. Our program will pass one unsorted array to a function, it will find the third largest number and return it.

Read