All Go Rust Python PHP JavaScript
Chrome Dev Summit to secure your spot in workshops, office hours and learning lounges!

How to Make a Shallow Copy of a Slice in Go

In Golang, there are 2 ways to duplicate slices. Using append Function You could write one simple statement to make a shallow copy of a slice. The following example should cover whatever you are trying to do: package main import "fmt" type T...
Unused

How to Remove Duplicates in List in Python

In Python, there are 3 ways to remove duplicates in list. Using Built-in set Function The built-in set() function returns a new set object, optionally with elements taken from iterable. If you later need a real list again, you can similarly pass the...
pooriabt

How to Remove Duplicates Strings from Slice in Go

In Golang, there are 2 ways to remove duplicates strings from slice.Using a Hash Map We have defined a function where we are passing the slice values and using the map function we are checking the duplicates and removing them. The ones that are curr...
pooriabt

How to find the intersection between two lists in Python

In Python, there are 4 ways to find the intersection between two lists. Using Set Intersection A set is an unordered collection with no duplicate elements. Basic uses include membership testing and eliminating duplicate entries. Set objects also sup...
Unused

How to find the difference between two lists in Python

In Python, there are 5 ways to find the difference between two lists. Using Set Difference A set is an unordered collection with no duplicate elements. Basic uses include membership testing and eliminating duplicate entries. Set objects also support...
Sambhav Khandelwal

How to use the df command in Linux

Show information about the file system on which each FILE resides, or all file systems by default. df (abbreviation for disk free) is a standard Unix command used to display the amount of available disk space for file systems on which the invoking us...