Skip to content

Instantly share code, notes, and snippets.

View vamsitallapudi's full-sized avatar
🚩
Become better than yesterday

Vamsi Tallapudi vamsitallapudi

🚩
Become better than yesterday
View GitHub Profile
# python program to print below average marks
marks = [100, 76, 45, 28, 52, 17, 83]
below_average = list(filter(lambda x : x<35, marks))
print(below_average)
# python program to find volume of a cube
volume = lambda l,b,h : l*b*h
print(volume(3,2,4))
# python program to print a square using lambda function
square = lambda x : x**2
print(square(3))
@vamsitallapudi
vamsitallapudi / print_permutations.py
Last active February 13, 2020 16:22
Print permutations of a given string using Python
def toStr(list):
return ''.join(list)
def permute(s, l, r):
"""
Function to find permutations of a given sting
:arg s : string,
:arg l : left element of the string,
:arg r : right element of the string.
"""

Python Interview Questions And Answers

Curated List of Real-time Python Interview Questions. Help fellow developers by contributing to these interview Questions - Create a pull request in Github.

  • What is Python?
    A) Python is an interpreted, high-level, general-purpose programming language. The significant feature of Python Programming Language is its code readability. Python is open source, which makes it free to use and distribute.

  • What are the advantages of using Python?
    A) Python is mainly used for the following:

class ExampleFragment : Fragment() {
...
...
companion object {
fun newInstance() : ExampleFragment {
return ExampleFragment()
}
}
}
<resources> <!-- Base application theme for Android Custom Font -->
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. -->
<item name="android:typeface">monospace</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style> <!--Defining colors for TextInputLayout's EditText-->
<style name="TextLabel" parent="TextAppearance.AppCompat"> <!-- Hint color and label color in FALSE state -->
<item name="android:textColorHint">#9575cd</item>
<item name="android:textSize">20sp
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.coderefer.firebasedatabaseexample">
<application
android:name=".CustomFontApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
package com.coderefer.firebasedatabaseexample;
import android.app.Application;
import com.coderefer.firebasedatabaseexample.util.FontsOverride;
/**
* Created by vamsi on 06-05-2017 for android custom font article
*/
package com.coderefer.firebasedatabaseexample.util;
import android.content.Context;
import android.graphics.Typeface;
import java.lang.reflect.Field;
/**
* Created by vamsi on 06-05-2017 for Android custom font article
*/
public class FontsOverride {