task: metadata: install: pip install -e .[default]
patch: diff --git a/networkx/algorithms/bipartite/edgelist.py b/networkx/algorithms/bipartite/edgelist.py
index ebd47b032..db6ef9d8e 100644
--- a/networkx/algorithms/bipartite/edgelist.py
+++ b/networkx/algorithms/bipartite/edgelist.py
@@ -220,7 +220,7 @@ def parse_edgelist(
         if not len(line):
             continue
         # split line, should have 2 or more
-        s = line.strip().split(delimiter)
+        s = line.rstrip("\n").split(delimiter)
         if len(s) < 2:
             continue
         u = s.pop(0)
diff --git a/networkx/readwrite/adjlist.py b/networkx/readwrite/adjlist.py
index 56a1b4d2b..768af5ad7 100644
--- a/networkx/readwrite/adjlist.py
+++ b/networkx/readwrite/adjlist.py
@@ -201,7 +201,7 @@ def parse_adjlist(
             line = line[:p]
         if not len(line):
             continue
-        vlist = line.strip().split(delimiter)
+        vlist = line.rstrip("\n").split(delimiter)
         u = vlist.pop(0)
         # convert types
         if nodetype is not None:
diff --git a/networkx/readwrite/edgelist.py b/networkx/readwrite/edgelist.py
index ed445c80b..393b64ed7 100644
--- a/networkx/readwrite/edgelist.py
+++ b/networkx/readwrite/edgelist.py
@@ -247,7 +247,7 @@ def parse_edgelist(
             if not line:
                 continue
         # split line, should have 2 or more
-        s = line.strip().split(delimiter)
+        s = line.rstrip("\n").split(delimiter)
         if len(s) < 2:
             continue
         u = s.pop(0)
diff --git a/networkx/readwrite/multiline_adjlist.py b/networkx/readwrite/multiline_adjlist.py
index 526b30a9b..808445dbf 100644
--- a/networkx/readwrite/multiline_adjlist.py
+++ b/networkx/readwrite/multiline_adjlist.py
@@ -246,7 +246,7 @@ def parse_multiline_adjlist(
         if not line:
             continue
         try:
-            (u, deg) = line.strip().split(delimiter)
+            (u, deg) = line.rstrip("\n").split(delimiter)
             deg = int(deg)
         except BaseException as err:
             raise TypeError(f"Failed to read node and degree on line ({line})") from err
@@ -270,7 +270,7 @@ def parse_multiline_adjlist(
                     line = line[:p]
                 if line:
                     break
-            vlist = line.strip().split(delimiter)
+            vlist = line.rstrip("\n").split(delimiter)
             numb = len(vlist)
             if numb < 1:
                 continue  # isolated node

problem_statement: edgelist reader removes deliminators if deliminator is white-space and file has empty fields [BUG]
This `line.strip` without an argument, means a white-space delimited file (e.g. tab, which is quite common) with  empty edge attribute(s) in the last column(s) results in a crash with error `Edge data [...] and data_keys [...] are not the same length`. 
   
https://github.com/networkx/networkx/blob/729bec23b10e89b5f6d37175e30484f2278107c4/networkx/algorithms/bipartite/edgelist.py#L222

An example file that would crash:

```
A	B	interaction	2
B	C	interaction	4
C	A	interaction	
```
The last line ends in `\t\n`, and both are striped instead of just the `\n`. This is inconsistent, as the same data in a different order of columns works fine, e.g.:
```
A	B	2	interaction
B	C	4	interaction
C	A		interaction
```


# Fix

    s = line.rstrip("\n").split(delimiter)

is the safe fix, and is cross OS compatible in Python (https://peps.python.org/pep-0278/)
repo: networkx/networkx
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/networkx/algorithms/bipartite/tests/test_edgelist.py b/networkx/algorithms/bipartite/tests/test_edgelist.py
index 86ffba072..66be8a2f5 100644
--- a/networkx/algorithms/bipartite/tests/test_edgelist.py
+++ b/networkx/algorithms/bipartite/tests/test_edgelist.py
@@ -216,3 +216,25 @@ class TestEdgelist:
             G = bipartite.parse_edgelist(
                 lines, nodetype=int, data=[("weight", int), ("key", int)]
             )
+
+
+def test_bipartite_edgelist_consistent_strip_handling():
+    """See gh-7462
+
+    Input when printed looks like:
+
+        A       B       interaction     2
+        B       C       interaction     4
+        C       A       interaction
+
+    Note the trailing \\t in the last line, which indicates the existence of
+    an empty data field.
+    """
+    lines = io.StringIO(
+        "A\tB\tinteraction\t2\nB\tC\tinteraction\t4\nC\tA\tinteraction\t"
+    )
+    descr = [("type", str), ("weight", str)]
+    # Should not raise
+    G = nx.bipartite.parse_edgelist(lines, delimiter="\t", data=descr)
+    expected = [("A", "B", "2"), ("A", "C", ""), ("B", "C", "4")]
+    assert sorted(G.edges(data="weight")) == expected
diff --git a/networkx/readwrite/tests/test_adjlist.py b/networkx/readwrite/tests/test_adjlist.py
index 6f52c234f..f2218eba1 100644
--- a/networkx/readwrite/tests/test_adjlist.py
+++ b/networkx/readwrite/tests/test_adjlist.py
@@ -239,3 +239,24 @@ class TestMultilineAdjlist:
         H = nx.read_multiline_adjlist(fh, nodetype=int, delimiter=":")
         assert nodes_equal(list(H), list(G))
         assert edges_equal(list(H.edges()), list(G.edges()))
+
+
+@pytest.mark.parametrize(
+    ("lines", "delim"),
+    (
+        (["1 2 5", "2 3 4", "3 5", "4", "5"], None),  # No extra whitespace
+        (["1\t2\t5", "2\t3\t4", "3\t5", "4", "5"], "\t"),  # tab-delimited
+        (
+            ["1\t2\t5", "2\t3\t4", "3\t5\t", "4\t", "5"],
+            "\t",
+        ),  # tab-delimited, extra delims
+        (
+            ["1\t2\t5", "2\t3\t4", "3\t5\t\t\n", "4\t", "5"],
+            "\t",
+        ),  # extra delim+newlines
+    ),
+)
+def test_adjlist_rstrip_parsing(lines, delim):
+    """Regression test related to gh-7465"""
+    expected = nx.Graph([(1, 2), (1, 5), (2, 3), (2, 4), (3, 5)])
+    nx.utils.graphs_equal(nx.parse_adjlist(lines, delimiter=delim), expected)
diff --git a/networkx/readwrite/tests/test_edgelist.py b/networkx/readwrite/tests/test_edgelist.py
index 9751885aa..fe58b3b7d 100644
--- a/networkx/readwrite/tests/test_edgelist.py
+++ b/networkx/readwrite/tests/test_edgelist.py
@@ -295,3 +295,20 @@ class TestEdgelist:
         assert H is not H2  # they should be different graphs
         assert nodes_equal(list(H), list(G))
         assert edges_equal(list(H.edges()), list(G.edges()))
+
+
+def test_edgelist_consistent_strip_handling():
+    """See gh-7462
+
+    Input when printed looks like::
+
+        1       2       3
+        2       3
+        3       4       3.0
+
+    Note the trailing \\t after the `3` in the second row, indicating an empty
+    data value.
+    """
+    s = io.StringIO("1\t2\t3\n2\t3\t\n3\t4\t3.0")
+    G = nx.parse_edgelist(s, delimiter="\t", nodetype=int, data=[("value", str)])
+    assert sorted(G.edges(data="value")) == [(1, 2, "3"), (2, 3, ""), (3, 4, "3.0")]