Skip to content

Instantly share code, notes, and snippets.

View ankur-anand's full-sized avatar
💭
Seize The Day!

Ankur Anand ankur-anand

💭
Seize The Day!
View GitHub Profile
@ankur-anand
ankur-anand / FirstClassObjects
Last active March 1, 2016 15:39
Python Notes
In the terminology of programming languages, first-class Objects are instances of a type
that can be assigned to an identifier, passed as a parameter, or returned by a function
In Python classes and functions are also treated as first-class Objects.
For Example
scream = print
# assign name 'scream' alias name to print
Modules are also first-class objects in Python
import java.util.ArrayList;
import java.util.Scanner;
class TestClass {
public static void main(String args[] ) throws Exception {
Scanner keyboard=new Scanner(System.in);
int t=keyboard.nextInt();
keyboard.nextLine();
ArrayList<String> vowelList= new ArrayList<>();
vowelList.add("a");
vowelList.add("e");