Skip to content

Instantly share code, notes, and snippets.

@vishalsingha
Last active January 29, 2021 13:00
Show Gist options
  • Save vishalsingha/4f562b8d2c0f829c751a91c014abd4d3 to your computer and use it in GitHub Desktop.
Save vishalsingha/4f562b8d2c0f829c751a91c014abd4d3 to your computer and use it in GitHub Desktop.
Untitled12.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Untitled12.ipynb",
"provenance": [],
"collapsed_sections": [],
"authorship_tag": "ABX9TyO6Za7gVdYnofJyaJV/jXeb",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/vishalsingha/4f562b8d2c0f829c751a91c014abd4d3/untitled12.ipynb\" target=\"_blank\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "hthura98vqzD",
"outputId": "32af0e7a-f115-44d7-979c-5bdc5e623dec"
},
"source": [
"print(2+3)\r\n",
"print(2*3)"
],
"execution_count": 6,
"outputs": [
{
"output_type": "stream",
"text": [
"5\n",
"6\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "lZptCJO4vBXn",
"outputId": "107555b0-221f-48c6-f8b4-0a4f7ced5534"
},
"source": [
"#print the line\r\n",
"print(\"hello world\")"
],
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"text": [
"hello world\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "VVm9MFaVvJfg",
"outputId": "723821e5-a1c5-4e10-dd17-b67867ab84f8"
},
"source": [
"print(\"hello Vishal\") # the default value for end is '\\n'.\r\n",
"print(\"Singh\")\r\n",
"\r\n",
"print(\"##################################################\")\r\n",
"\r\n",
"print(\"hello Vishal\", end='') # the default value for end is '\\n'.\r\n",
"print(\"Singh\")"
],
"execution_count": 9,
"outputs": [
{
"output_type": "stream",
"text": [
"hello Vishal\n",
"Singh\n",
"##################################################\n",
"hello VishalSingh\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "XQDXUQz5vbSa",
"outputId": "08384de8-7075-4256-a8ce-5557d26d66e8"
},
"source": [
"print(\"vishal\", \"singh\", sep = \"/\") # the default value for sep is ''"
],
"execution_count": 7,
"outputs": [
{
"output_type": "stream",
"text": [
"vishal/singh\n"
],
"name": "stdout"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment