Skip to content
murmot

Results for “function return python array example code in java site:geeksforgeeks.org”

  • geeksforgeeks.org

    How to split a string in C/C++, Python and Java? - GeeksforGeeks

    For example, we have a comma-separated list of items from a file and we want individual items in an array. Almost all programming languages, provide a function split a string by some delimiter.Auxiliary Space: O(n). In Java : In Java, split() is a method in String class.

  • geeksforgeeks.org

    Arrays in Java - GeeksforGeeks

    Nov 20, 2026 ... int[] arr = new int[5];. This creates an integer array that can hold five elements. Java automatically initializes array elements with default ...

  • geeksforgeeks.org

    Python map() function - GeeksforGeeks

    By default, map() function returns a map object. In many cases, we may need to convert this iterator to a list to work with the results directly. Example: Let's see how to double each element of the given list. Python. def double(val): return val * 2.

  • geeksforgeeks.org

    Function With Return - GeeksforGeeks

    Oct 31, 2026 ... Given an integer n, You need to use the return keyword to return twice the value of n. Examples: Input: n = 2. Output: 4. Explanation: 2 * 2 = 4

  • geeksforgeeks.org

    Python Tutorial - GeeksforGeeks

    Examples. Quizzes. DSA Python.Functions. Learn how to organize code into reusable blocks for performing specific tasks.

  • geeksforgeeks.org

    Numpy Meshgrid function - GeeksforGeeks

    The numpy.meshgrid function is used to create a rectangular grid out of two given one-dimensional arrays representing the Cartesian indexing or Matrix indexing. Meshgrid function is somewhat inspired from MATLAB.

  • geeksforgeeks.org

    Python Lists - GeeksforGeeks

    Examples.Python Lists. Last Updated : 19 Sep, 2026. List is a built-in data structure used to store an ordered collection of items. They are dynamic, resizable and capable of storing multiple data types. List elements can be changed, updated, added, or removed after the list is created.