• What is a String?
  • Defining a String







____________________________________________________________________________________________________________________________________________


What is a String?

  • A data type represented as a sequence of characters
  • Immutable in majority of programming languages, but are subject to manipulation


  • Defining a String

  • To create a string, assign text data to a variable, using quotes to indicate it’s a string.

  • # define your strings
    greeting = "hello brawler"
    usrname = "magic05"
    
    # print strings
    print(greeting)
    print(usrname)
    
    hello brawler
    magic05
    
    %%js 
    
    // define your strings
    let greeting = "hello brawler";
    let usrname = "magic05";
    
    // log strings in console
    console.log(greeting);
    console.log(usrname);
    
    <IPython.core.display.Javascript object>